package com.example.roadeyeserver.controller;

import com.example.roadeyeserver.entity.report.CrossOverviewReport;
import com.example.roadeyeserver.entity.report.CrossStationStatisticReport;
import com.example.roadeyeserver.entity.report.StationRankReport;
import com.example.roadeyeserver.entity.request.CommonRequest;
import com.example.roadeyeserver.entity.request.CrossStationStatisticRequest;
import com.example.roadeyeserver.entity.vo.StationHourFlowWideVO;
import com.example.roadeyeserver.result.Result;
import com.example.roadeyeserver.service.StationHourFlowWideService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("stationHourFlowWide")
public class StationHourFlowWideController {

    @Resource
    private StationHourFlowWideService stationHourFlowWideService;

    @PostMapping("getStationOverviewReport")
    public Result<CrossOverviewReport> getStationOverviewReport(@RequestBody CommonRequest request) {
        return stationHourFlowWideService.getStationOverviewReport(request);
    }

    @PostMapping("getStationRankReport")
    public Result<List<StationRankReport>> getStationRankReport(@RequestBody CommonRequest request) {
        return stationHourFlowWideService.getStationRankReport(request);
    }

    @PostMapping("getCrossStationStatisticReport")
    public Result<List<CrossStationStatisticReport>> getCrossStationStatisticReport(@RequestBody CrossStationStatisticRequest request) {
        return stationHourFlowWideService.getCrossStationStatisticReport(request);
    }

    @PostMapping("getStationHourFlowList")
    public Result<StationHourFlowWideVO> getStationHourFlowList(@RequestBody CrossStationStatisticRequest request) {
        return stationHourFlowWideService.getStationHourFlowList(request);
    }

    @PostMapping("getStationCarReport")
    public Result<List<StationHourFlowWideVO>> getStationCarReport(@RequestBody CrossStationStatisticRequest request) {
        return stationHourFlowWideService.getStationCarReport(request);
    }

    @PostMapping("getStationFlowReport")
    public Result<List<CrossStationStatisticReport>> getStationFlowReport(@RequestBody CommonRequest request) {
        return stationHourFlowWideService.getStationFlowReport(request);
    }

}
